<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.DriverManager" %>
<%@ page import="java.sql.Statement" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/common/config.jsp" %>
<html>
<head>
    <title>查看详情</title>
</head>
<body>

<%


    String id = request.getParameter("id");
    if (id == "" || "".equals(id)) {
        out.print("不是正确的学生学号，页面将在5秒内跳转到学生列表页面。");
        out.print("<a href=\"query.jsp\">立即跳转</a>");
        response.setHeader("refresh", "5;URL=query.jsp");
    } else {

        String sql = "delete from t_user where ID='" + id + "'";
        if (!sql.toLowerCase().contains("where")) {
            out.print("你TM是不是又忘记写删除条件了");
        } else {
            stmt.execute(sql);
            out.print("<center>");
            out.print("删除成功，2秒钟之后跳转到列表页面！");
            out.print("</center>");
            response.setHeader("refresh", "2;URL=query.jsp");
        }
        conn.close();
    }
%>


</body>
</html>
